const SkuGoods = require("./SkuGoods");

const CartGoods = function (skuGoods, count) {
  var that = SkuGoods(skuGoods._goods, skuGoods.skuId, skuGoods.skuName, skuGoods.skuThumb, skuGoods.skuPrice, skuGoods.realPrice);
  that.count = count;
  that.cartGoodsPrice = (Number(that.realPrice) * Number(that.count)).toFixed(2);

  delete(that._goods);
  return that;
};
module.exports = CartGoods;
